﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace SHomeWorkshop.LunarPresentation.Converts
{
    public class MarkTextSizeConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            if (values.Length != 2) return null;

            double srcFontSize = (double)values[0];
            int srcFontSizeLevel = (int)values[1];
            return (srcFontSize + srcFontSizeLevel * srcFontSizeLevel * 0.2) / 2;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
